<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript" charset="utf-8">
	$.messager.progress({
		text : '数据加载中....',
		interval : 100
	});
	
	
	$(function(){
	
		 //文本框只能输入数字，并屏蔽输入法和粘贴  
 			$.fn.numeral = function() {     
            $(this).css("ime-mode", "disabled");     
            this.bind("keypress",function(e) { 
                
            var code = (e.keyCode ? e.keyCode : e.which);  //兼容火狐 IE
            	if(code==37||code==39||code==35||code==36){
            		return true;
            	}      
                if(!$.browser.msie&&(e.keyCode==0x8))  //火狐下不能使用退格键     
                {     
                     return ;     
                    }     
                    return code >= 48 && code<= 57;     
            });     
            this.bind("blur", function() {     
                if (this.value.lastIndexOf(".") == (this.value.length - 1)) {     
                    this.value = this.value.substr(0, this.value.length - 1);     
                } else if (isNaN(this.value)) {     
                    this.value = "";     
                }     
            });     
            this.bind("paste", function() {     
                var s = clipboardData.getData('text');     
                if (!/\D/.test(s));     
                value = s.replace(/^0*/, '');     
                return false;     
            });     
            this.bind("dragenter", function() {     
                return false;     
            });     
            this.bind("keyup", function() {     
            if (/(^0+)/.test(this.value)) {     
                this.value = this.value.replace(/^0*/, '');     
                }     
            });     
        };    
		
		$("#mobile").numeral();
		$("#points").numeral();

		function formatDate(v) {
			if (v instanceof Date) {
				var m = v.getMonth() + 1;
				var d = v.getDate();
				return m + '-' + d;
			}
			return '';
		}

		$('#birthdayA').datebox( {
			currentText : '今天',
			closeText : '关闭',
			disabled : false,
			editable:false,
			required : true,
			missingMessage : '必填',
			formatter : formatDate

		});
		
	});
</script>
<div style="padding: 5px;">
	<form id="memberForm" method="post">
		<table class="tableForm">
			<tr>
				<th style="width: 100px;">会员编号</th>
				<td><input name="serial" class="easyui-validatebox" readonly="readonly" data-options="required:'true',missingMessage:'请填写会员编号'" style="width: 145px;"/>
				</td>
				<th style="width: 100px;">会员类型</th>
				<td><input name="tid" style="width: 145px;" /></td>
			</tr>
			<tr>
				<th>会员姓名</th>
				<td><input name="name"   style="width: 145px;" data-options="required:'true',missingMessage:'请填写会员名称'" style="width: 145px;"/>
				</td>
				<th>会员手机</th>
				<td><input name="mobile" style="width: 145px;" id="mobile"/>
				</td>
			</tr>
			
			 <tr>
	 			<th>生&nbsp;&nbsp;&nbsp;&nbsp;日</th>
			    <td>
			    	<input type="text" id="birthdayA" name="birthdayA" style="width: 145px;">
			    </td>
			    <th>商店名称</th>
			    <td ><input name="rid" data-options="required:'true',missingMessage:'请选择所属商店'" id="rid" style="width: 145px;"></td>
			  </tr>
			  <tr>
				<th>会员积分</th>
				<td colspan="3"><input name="point" style="width: 145px;" id="points"/>
				</td>
			</tr>
			  <tr>
			    <th>地&nbsp;&nbsp;&nbsp;&nbsp;址</th>
			    <td colspan="3"><textarea type="text" id="address" name="address"  rows="1" style="width: 400px"></textarea></td>		  	
			  </tr>
			  <tr>
			 	<th>备&nbsp;&nbsp;&nbsp;&nbsp;注</th>
			  	<td colspan="3"><textarea type="text"  name="remark" id="mRemark" rows="1" style="width:400px"></textarea> </td>
			  </tr>
		</table>
	</form>
</div>